<template>
  <div :style="{ width: galleryWidth + 'px', height: galleryHeight + 'px' }">
  </div>
</template>

<script type="text/babel">
  import GalleryAdapter from './GalleryAdapter'

  var onChanged = function (state, newDataSet) {
    
  }

  export default {
    props: {
      galleryWidth: {
        type: Number
      },
      galleryHeight: {
        type: Number
      },
      galleryAdapter: {
        type: GalleryAdapter,
        required: true
      }
    },
    attached: function () {
      this.galleryAdapter.registerObserver(onChanged)
    },
    detached: function () {
      this.galleryAdapter.unregisterObserver(onChanged)
    },
    ready: function () {
    }
  }
</script>